Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 'use strict' |
||
3 | module.exports = (input, callback) => { |
||
4 | const validate = require('./validate') |
||
5 | let error = null |
||
6 | let output |
||
7 | |||
8 | validate(input, (validatedInput, thrownError) => { |
||
9 | input = validatedInput |
||
10 | error = thrownError |
||
11 | }) |
||
12 | |||
13 | output = { |
||
14 | 'version': {'ref': 'input'}, |
||
15 | 'metadata': [ |
||
16 | {'name': 'topic', 'value': 'Hulk Hogan'}, |
||
17 | {'name': 'timestamp', 'value': Date.now().toString()} |
||
18 | ] |
||
19 | } |
||
20 | |||
21 | callback(error, output, source) |
||
|
|||
22 | } |
||
23 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.